using System;
using System.ComponentModel.DataAnnotations;
using MESBaseis.Domain.BaseEntities;

namespace MESBaseis.Domain.XZY
{
    /// <summary>
    /// 审批单据实体
    /// </summary>
    public class ApprovalDocumentModel : BaseModel
    {
        /// <summary>
        /// 单据类型
        /// </summary>
        [Required]
        [StringLength(50)]
        public string DocumentType { get; set; } = string.Empty;

        /// <summary>
        /// 关联单据ID
        /// </summary>
        [Required]
        public int DocumentId { get; set; }

        /// <summary>
        /// 关联单据编号
        /// </summary>
        [StringLength(50)]
        public string? DocumentNumber { get; set; }

        /// <summary>
        /// 审批状态
        /// </summary>
        [Required]
        [StringLength(50)]
        public string Status { get; set; } = "待审批";

        /// <summary>
        /// 优先级
        /// </summary>
        public int Priority { get; set; } = 0;

        /// <summary>
        /// 申请人
        /// </summary>
        [StringLength(100)]
        public string? Applicant { get; set; }

        /// <summary>
        /// 申请时间
        /// </summary>
        public DateTime? ApplicationTime { get; set; }

        /// <summary>
        /// 审批人
        /// </summary>
        [StringLength(100)]
        public string? Approver { get; set; }

        /// <summary>
        /// 审批时间
        /// </summary>
        public DateTime? ApprovalTime { get; set; }

        /// <summary>
        /// 审批意见
        /// </summary>
        [StringLength(500)]
        public string? ApprovalComments { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string? Remarks { get; set; }
    }
}